package com.android.datn;

import java.util.ArrayList;

import com.android.datn.daos.TrackDAO;
import com.android.datn.objects.Track;
import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;

import android.app.Application;
import com.viewpagerindicator.CirclePageIndicator;

public class MyApplication extends Application {
	public static ArrayList<Track> ArrayTrack;

	@Override
	public void onCreate() {
		super.onCreate();
		ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
				getApplicationContext())
				.threadPoolSize(3)
				.threadPriority(Thread.NORM_PRIORITY - 2)
				.memoryCacheSize(1500000)
				.denyCacheImageMultipleSizesInMemory()
				.discCacheFileNameGenerator(new Md5FileNameGenerator())
				.enableLogging().build();
		ImageLoader.getInstance().init(config);
		TrackDAO.initInstance(getApplicationContext());
		ArrayTrack = new ArrayList<Track>();
	}
}
